#pragma once
class WorldClient;
class WorldServer;
class DBSocket;

enum EPLAYERSTATE
{
	EPS_LOGINING,
	EPS_LOGINED,
	EPS_SELECTROLE,
	EPS_ROLEJION,
	EPS_LOGOUTING,
	EPS_LOGOUTED
};

class WorldSession
{
public:
	WorldSession(char* PlayerName, WorldClient* p);
	~WorldSession(void);
	void	ExecuteOpcode(tagMessage* m);
	void	Stop();
	void	Update();
	void	SendMsg(tagMessage* lp, DWORD dwSize);
	DWORD	GetPlayerID();
	bool	GetPlayerState(EPLAYERSTATE s);
	bool	SetPlayerState(EPLAYERSTATE s);
private:
	DWORD	m_dwPlayerID;
	char	m_szPlayerName[32];

	static	DBSocket* m_pSend2DB;
	WorldClient* m_pClient;
	EPLAYERSTATE	m_eState;
};
